/**
 * @param {string} word
 * @return {number}
 */
 var longestBeautifulSubstring = function(word) {
    const n = word.length
    if(n < 5)
        return 0
    const Reg = new RegExp(/a+e+i+o+u+/g)
    let idx = 0
    while(word.search(Reg)){
        idx = word.search(Reg)
        word = word.slice(idx)
    }
    let s = word.match(Reg)
    if(!s)
        return 0
    s = s.map(item => item.length)
    let ans = 0
    for(let x of s)
        ans = Math.max(ans, x)
    return ans
};